/*
跳转到各个页面的handle
*/
import 'package:appflutterhomeschool/ui/pages/academic_sentiment/analysis_report_page.dart';
import 'package:appflutterhomeschool/ui/pages/academic_sentiment/answer_display_page.dart';
import 'package:appflutterhomeschool/ui/pages/academic_sentiment/answer_sheet_page.dart';
import 'package:appflutterhomeschool/ui/pages/academic_sentiment/job_list_status_page.dart';
import 'package:appflutterhomeschool/ui/pages/academic_sentiment/knowledge_statistics_page.dart';
import 'package:appflutterhomeschool/ui/pages/academic_sentiment/operation_details_page.dart';
import 'package:appflutterhomeschool/ui/pages/academic_sentiment/performance_curve_page.dart';
import 'package:appflutterhomeschool/ui/pages/academic_sentiment/task_page.dart';
import 'package:appflutterhomeschool/ui/pages/letter/letter_details_page.dart';
import 'package:appflutterhomeschool/ui/pages/letter/reply_letter_page.dart';
import 'package:appflutterhomeschool/ui/pages/letter/system/system_notification_page.dart';
import 'package:appflutterhomeschool/ui/pages/main_tab_page.dart';
import 'package:appflutterhomeschool/ui/pages/notice/apply_page.dart';
import 'package:appflutterhomeschool/ui/pages/notice/discuss_page.dart';
import 'package:appflutterhomeschool/ui/pages/notice/new/custum_notifications_page.dart';
import 'package:appflutterhomeschool/ui/pages/notice/new/new_notification_page.dart';
import 'package:appflutterhomeschool/ui/pages/notice/new/recipient_list_page.dart';
import 'package:appflutterhomeschool/ui/pages/notice/new_form/add_question_type_page.dart';
import 'package:appflutterhomeschool/ui/pages/notice/new_form/form_data_page.dart';
import 'package:appflutterhomeschool/ui/pages/notice/new_form/form_details_page.dart';
import 'package:appflutterhomeschool/ui/pages/notice/new_form/new_form_page.dart';
import 'package:appflutterhomeschool/ui/pages/notice/status_selection_list_page.dart';
import 'package:appflutterhomeschool/ui/pages/notice/switch_classes_page.dart';
import 'package:appflutterhomeschool/ui/pages/sign_in/login_page.dart';
import 'package:appflutterhomeschool/ui/pages/sign_in/register_page.dart';
import 'package:appflutterhomeschool/ui/pages/user/about_us_page.dart';
import 'package:appflutterhomeschool/ui/pages/user/change_password_page.dart';
import 'package:appflutterhomeschool/ui/pages/user/confirm_corder_page.dart';
import 'package:appflutterhomeschool/ui/pages/user/course_details_page.dart';
import 'package:appflutterhomeschool/ui/pages/user/customer_service_page.dart';
import 'package:appflutterhomeschool/ui/pages/user/customization_page.dart';
import 'package:appflutterhomeschool/ui/pages/user/help_details_page.dart';
import 'package:appflutterhomeschool/ui/pages/user/leave_word_page.dart';
import 'package:appflutterhomeschool/ui/pages/user/new_class_page.dart';
import 'package:appflutterhomeschool/ui/pages/user/personal_data_page.dart';
import 'package:appflutterhomeschool/ui/pages/user/student_information_page.dart';
import 'package:appflutterhomeschool/ui/pages/user/switch_identity_page.dart';
import 'package:appflutterhomeschool/ui/pages/user/set_up_page.dart';
import 'package:appflutterhomeschool/ui/pages/sign_in/agreed_announcement_page.dart';
import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';

///首页
Handler mainTabHandler = new Handler(
    handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
  return MainTabPage();
});

///登录
Handler loginHandler = new Handler(
    handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
  return LoginPage();
});

///0 注册  1 忘记密码  2 微信登录
Handler registerHandler = new Handler(
    handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
  int pageTag = int.parse(params['pageTag'].first);
  return RegisterPage(pageTag: pageTag);
});

///选择身份
Handler switchIdentityHandler = new Handler(
    handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
  int pageTage = int.parse(params['pageTag'].first);
  return SwitchIdentityPage(pageTage: pageTage);
});

///选择班级
Handler switchClassesHandler = new Handler(
    handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
  return SwitchClassesPage();
});

///审核页面
Handler applyHandler = new Handler(
    handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
  int pageTag = int.parse(params["pageTag"].first);
  return ApplyPage(pageTag: pageTag);
});

///讨论页面
Handler discussHandler = new Handler(
    handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
  int notificationId = int.parse(params["notification_id"].first);
  return DiscussPage(notificationId: notificationId);
});

///讨论页面
Handler statusSelectionListHandler = new Handler(
    handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
  int pageTag = int.parse(params["pageTag"].first);
  return StatusSelectionListPage(
    pageTag: pageTag,
  );
});

///新建通知
Handler newNotificationHandler = new Handler(
    handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
  return NewNotificationPage();
});

///自定义创建通知
Handler custumNotificationsHandler =
    Handler(handlerFunc: (BuildContext context, params) {
  int pageTag = int.parse(params["pageTag"].first);
  return CustumNotificationsPage(
    pageTag: pageTag,
  );
});

///接收人列表
Handler recipientListHandler = Handler(handlerFunc: (context, params) {
  return RecipientListPage();
});

///系统通知
Handler systemNotificationHandler = Handler(handlerFunc: (context, params) {
  return SystemNotificationPage();
});

///信件页面的详情页
Handler letterDetailsHandler = Handler(handlerFunc: (context, params) {
  return LetterDetailsPage();
});

///ReplyLetterPage
Handler replyLetterHandler = Handler(handlerFunc: (context, params) {
  return ReplyLetterPage();
});

///学生信息
Handler studentInformationHandler = Handler(handlerFunc: (context, params) {
  return StudentInformationPage();
});

///设置
Handler setUpHandler = Handler(handlerFunc: (context, params) {
  return SetUpPage();
});

///关于我们
Handler aboutUsHandler = Handler(handlerFunc: (context, params) {
  return AboutUsPage();
});

///个人资料
Handler personalDataHandler = Handler(handlerFunc: (context, params) {
  return PersonalDataPage();
});

///修改密码
Handler changePasswordHandler = Handler(handlerFunc: (context, params) {
  return ChangePasswordPage();
});

///帮助客服
Handler customerServiceHandler = Handler(handlerFunc: (context, params) {
  return CustomerServicePage();
});

///帮助详情
Handler helpDetailsHandler = Handler(handlerFunc: (context, params) {
  return HelpDetailsPage();
});

///留言页面
Handler leaveWordHandler = Handler(handlerFunc: (context, params) {
  return LeaveWordPage();
});

///新建班级
Handler newClassHandler = Handler(handlerFunc: (context, params) {
  return NewClassPage();
});

///资源库
Handler customizationHandler = Handler(handlerFunc: (context, params) {
  return CustomizationPage(
    pageTag: 0,
  );
});

///课程详情
Handler coureDetailsHandler = Handler(handlerFunc: (context, params) {
  return CoureDetailsPage();
});

///确认订单
Handler confirmCorderHandler = Handler(handlerFunc: (context, params) {
  return ConfirmCorderPage();
});

///知识点统计
Handler knowledgeStatisticsHandler = Handler(handlerFunc: (context, params) {
  return KnowledgeStatisticsPage();
});

///作业任务
Handler taskHandler = Handler(handlerFunc: (context, params) {
  return TaskPage();
});

///考试分析报告
Handler analysisReportHandler = Handler(handlerFunc: (context, params) {
  return AnalysisReportPage();
});

///作业详情
Handler operationDetailsHandler = Handler(handlerFunc: (context, params) {
  String id = params["id"].first;

  return OperationDetailsPage(id: id);
});

///成绩曲线
Handler performanceCurveHandler = Handler(handlerFunc: (context, params) {
  return PerformanceCurvePage();
});

///协议及声明
Handler agreedAnnouncementHandler = Handler(handlerFunc: (context, params) {
  return AgreedAnnouncementPage();
});

///新建表单
Handler newFormHandler = Handler(handlerFunc: (context, params) {
  return NewFormPage();
});

///添加题型
Handler addQuestionTypeHandler = Handler(handlerFunc: (context, params) {
  int pageTag = int.parse(params["pageTag"].first);
  int getIndex = int.parse(params["getIndex"].first);
  return AddQuestionTypePage(
    pageTag: pageTag,
    getIndex: getIndex,
  );
});

///表单详情
Handler formDetailsHandler = Handler(handlerFunc: (context, params) {
  int notificationId = int.parse(params["notification_id"].first);
  return FormDetailsPage(
    notificationId: notificationId,
  );
});

///表单数据
Handler formDataHandler = Handler(handlerFunc: (context, params) {
  return FormDataPage();
});

///答题卡
Handler answerSheetHandler = Handler(handlerFunc: (context, params) {
  String id = params["id"].first;
  return AnswerSheetPage(
    id: id,
  );
});

///答题卡详情
Handler answerDisplayHandler = Handler(handlerFunc: (context, params) {
  int pageTag = int.parse(params["pageTag"].first);
  String id = params["id"].first;
  return AnswerDisplayPage(pageTag: pageTag,id:id);
});

///作业列表状态
Handler jobListStatusHandler = Handler(handlerFunc: (context, params) {
  String id = params["id"].first;
  return JobListStatusPage(id: id);
});
